package com.smartalarmclock.Model;

import android.content.Context;

import com.smartalarmclock.Model.Exceptions.DataEntityDoesNotExistException;

public final class SnoozeFactory implements IDataEntityFactory {

	/**
	 * Creates a new snooze instance.
	 * @param durationInMinutes the number of minutes between snooze
	 */
	public ISnooze CreateSnooze(int durationInMinutes) {
		return new Snooze(durationInMinutes);
	}
	
	/**
	 * Creates a new snooze instance, using the default duration 
	 */
	public ISnooze Snooze() {
		return new Snooze();
	}
	
	/**
	 * Queries the DB for the Snooze instance with the given id.
	 * @param context the context of the request (the originating Activity)
	 * @param snoozeId the id of the Snooze instance
	 * @return the matching Snooze instance
	 * @throws DataEntityDoesNotExistException if the Snooze record with the matching id was not found
	 */
	public ISnooze GetSnoozeById(Context context, int snoozeId) throws DataEntityDoesNotExistException {
		return Snooze.GetSnoozeById(context, snoozeId);
	}
}
